<?php
include ('../model/connect.php');
include ('../model/Faculty/Faculty_class.php');
session_start();

$facultyname = $_POST['facultyname'];
$facultypass = $_POST['facultypass'];
$faculty = new Faculty();


if($faculty->checkLogin($facultyname,$facultypass) == true){
    $_SESSION["username"] = $facultyname;
    $_SESSION["facultyname"] = $facultyname;
    header("location:http:/educational/faculty-index.php?p=facultyhome");
}else{
    $_SESSION["error"] = "<script>alert(\"Login error !!!\");</script>";
    header("location:http:/educational/index.php");
}

mysql_close($conn);


?>